import request from '@/utils/request';

/**
 * 发起退款申请
 * @param data
 */
export const refundApply = () => {
  return request({
    url: '/business/refund/refundApply',
    method: 'put'
  });
};

export const pass = (refundApplyId: string | number, result: string) => {
  const data = {
    refundApplyId,
    result
  };
  return request({
    url: '/business/refund/pass',
    method: 'put',
    headers: {
      isEncrypt: true,
      repeatSubmit: true
    },
    data: data
  });
};

export const reject = (refundApplyId: string | number, result: string) => {
  const data = {
    refundApplyId,
    result
  };
  return request({
    url: '/business/refund/reject',
    method: 'put',
    headers: {
      isEncrypt: true,
      repeatSubmit: true
    },
    data: data
  });
};

export const passMr = (refundApplyId: string | number, result: string) => {
  const data = {
    refundApplyId,
    result
  };
  return request({
    url: '/business/refund/passMr',
    method: 'put',
    headers: {
      isEncrypt: true,
      repeatSubmit: true
    },
    data: data
  });
};

export const rejectMr = (refundApplyId: string | number, result: string) => {
  const data = {
    refundApplyId,
    result
  };
  return request({
    url: '/business/refund/rejectMr',
    method: 'put',
    headers: {
      isEncrypt: true,
      repeatSubmit: true
    },
    data: data
  });
};
